<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>消息提醒</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/layer/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/static/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="/static/ucss/admin/app.css" media="all"/>
    <link rel="stylesheet" href="/static/ucss/admin/themes/default.css" media="all" id="skin" shs-skin/>
    <style>
        /*.layui-tab-title li {
            position: relative;
            line-height: 40px;
            min-width: 300px;
            padding: 0 15px;
            text-align: center;
            cursor: pointer;
        }
        #ones{
            text-align:center;
        }*/
    </style>
</head>
<body>
<div style="padding: 20px;margin-top: 20px;"">
        <div class="layui-form-item">
            <label class="layui-form-label">标题：</label>
            <div class="layui-input-block">
                <input type="text" name="TITLE" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发送人：</label>
            <div class="layui-input-block">
                <input type="text" name="SEND_NAME" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">公告内容：</label>
            <div class="layui-input-block">
                <textarea name="CONTENT" placeholder="" class="layui-textarea"></textarea>
            </div>
        </div>
</div>
<script type="text/javascript" src="../../static/layer/layui.js"></script>
<script type="text/javascript" src="../../static/js/common/queryUtils.js"></script>
<script>
    var $;
    layui.use(['table', 'element','jquery', 'layer', 'laydate', 'form','laypage'], function(){
        $ = layui.jquery,  layer = layui.layer, laypage = layui.laypage
        var  id= QueryUtils.GetQueryString("NOTICE_ID");
        $.ajax({
            url: "/sysMessage/findnotice",
            data: {MESSAGE_ID: id},
            dataType: "json",
            type: "post",
            async: false,
            success: function (res) {
                if (res.errcode === "0") {
                    $("input[name='TITLE']").val(res.data.TITLE);
                    $("input[name='SEND_NAME']").val(res.data.SEND_NAME);
                    $("textarea[name='CONTENT']").val(res.data.CONTENT);
                    $("input").attr("readonly","readonly");
                    $("textarea").attr("readonly","readonly");
                } else if (res.errcode === "1") {
                    layer.msg(res.errmsg, function () {
                    });
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.error(XMLHttpRequest.status);
                console.error(XMLHttpRequest.readyState);
                console.error(textStatus);
            }
        });
    });
</script>
</body>
</html>